<template>
  <div class="main-container">
    <div style="margin:10px 0 0 10px;">
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item>人力资源管理</el-breadcrumb-item>
        <el-breadcrumb-item>审批管理</el-breadcrumb-item>
      </el-breadcrumb>
      <el-divider></el-divider>
    </div>

    <div>
      <el-row>
        <el-col :span="24">
          <div style="text-align:center;">
            <h1>报销单</h1>
          </div>
        </el-col>
      </el-row>
    </div>

    <div class="mt20">
      <el-row>
        <el-col :span="8">
          <div style="text-align:center;">
            <span>单据编号：202502150001</span>
          </div>
        </el-col>
        <el-col :span="8">
          <div style="text-align:center;">
            <span>报销人员：高伟</span>
          </div>
        </el-col>
        <el-col :span="8">
          <div style="text-align:center;">
            <span>提单时间：2025-02-15 10:30:00</span>
          </div>
        </el-col>
      </el-row>
    </div>

    <div class="mt20">
      <el-row>
        <el-col :span="20" :offset="2">
          <div style="text-align:center;">
            <el-table :data="equipmentList" border stripe :cell-style="pinkCellStyle">
              <el-table-column prop="id" label="序号" width="80" align="center"></el-table-column>
              <el-table-column prop="f1" label="日期" min-width="120" align="center"></el-table-column>
              <el-table-column prop="f2" label="事项" min-width="120" align="center"></el-table-column>
              <el-table-column prop="f3" label="报销金额" min-width="120" align="center"></el-table-column>
              <el-table-column prop="f4" label="备注" min-width="300" align="center"></el-table-column>
              <el-table-column prop="f5" label="审批意见" min-width="300" align="center"></el-table-column>
            </el-table>
          </div>
        </el-col>
      </el-row>
    </div>

    <div class="mt20">
      <el-row>
        <el-col :span="20" :offset="2">
          <el-button type="primary" @click="submitForm">审批通过</el-button>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'

@Component({
  components: {}
})
export default class EquipmentList extends Vue {
  submitForm() { }
  equipmentList: any[] = [
  {
    "id": 1,
    "f1": "2024-01-10",
    "f2": "餐补 260；住房补 600；通勤补助 420",
    "f3": 1280,
    "f4": "无",
    "f5": "审核通过"
  },
  {
    "id": 2,
    "f1": "2024-02-15",
    "f2": "餐补 300；住房补 650；通勤补助 450",
    "f3": 1400,
    "f4": "出差",
    "f5": "审核通过"
  },
  {
    "id": 3,
    "f1": "2024-03-20",
    "f2": "餐补 280；住房补 620；通勤补助 430",
    "f3": 1330,
    "f4": "参加业务会议",
    "f5": "审核通过"
  },
  {
    "id": 4,
    "f1": "2024-04-05",
    "f2": "餐补 310；住房补 670；通勤补助 460",
    "f3": 1440,
    "f4": "出差",
    "f5": "审核通过"
  },
  {
    "id": 5,
    "f1": "2024-05-18",
    "f2": "餐补 290；住房补 640；通勤补助 440",
    "f3": 1370,
    "f4": "年度总结会",
    "f5": "审核通过"
  },
  {
    "id": 6,
    "f1": "2024-06-22",
    "f2": "餐补 270；住房补 600；通勤补助 420",
    "f3": 1290,
    "f4": "参加行业交流会",
    "f5": "审核通过"
  },
  {
    "id": 7,
    "f1": "2024-07-15",
    "f2": "餐补 320；住房补 680；通勤补助 470",
    "f3": 1470,
    "f4": "外地出差",
    "f5": "审核通过"
  },
  {
    "id": 8,
    "f1": "2024-08-03",
    "f2": "餐补 310；住房补 650；通勤补助 460",
    "f3": 1420,
    "f4": "出差",
    "f5": "审核通过"
  },
  {
    "id": 9,
    "f1": "2024-09-10",
    "f2": "餐补 330；住房补 690；通勤补助 480",
    "f3": 1500,
    "f4": "项目合作，开会",
    "f5": "审核通过"
  },
  {
    "id": 10,
    "f1": "2025-01-05",
    "f2": "餐补 340；住房补 700；通勤补助 490",
    "f3": 1530,
    "f4": "年终会议",
    "f5": "审核通过"
  }
]
  pinkCellStyle({ row, column, rowIndex, columnIndex }) {
    if (columnIndex === 5) {
      return {
        'background-color': 'pink',
        'font-weight': 'bold'
      }
    }
    return {}
  }
}
</script>

<style lang="scss" scoped></style>
